<template>
    <div class="dialog">
        分析报表
      <!-- <el-form :inline="true" :model="params" class="demo-form-inline">
        <el-form-item label="门店名称">
          <el-input placeholder="请输门店名称" v-model="params.shopName"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSearch" style="margin-left: 100px">查询</el-button>
          <el-button type="primary" @click="onAddShop" style="margin-left: 10px">添加库存</el-button>
        </el-form-item>
      </el-form>
  
      <el-table :data="tableData" border stripe style="width: 100%" v-loading="loading" size="small">
        <el-table-column prop="id" label="序号" align="center" width="90"> </el-table-column>
        <el-table-column prop="shopName" label="门店名称" align="center"></el-table-column>
        <el-table-column prop="shopAddress" label="门店地址" align="center"></el-table-column>
        <el-table-column prop="contactName" label="联系人" align="center"></el-table-column>
        <el-table-column prop="contactTel" label="联系电话" align="center"></el-table-column>
        <el-table-column prop="status" label="门店状态" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.status == 1" style="color: #67C23A;">启用</span>
            <span v-if="scope.row.status == 0" style="color: #F56C6C;">禁用</span>
          </template>
        </el-table-column>
        <el-table-column prop="createTime" label="创建时间" align="center" width="150"></el-table-column>
        <el-table-column label="操作" align="center" fixed="right" width="200">
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="onEditShop(scope.row)">编辑</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div class="block" style="float: left; margin-top: 20px">
        <div>
          <span style="
              padding-top: 10px;
              display: inline-block;
              vertical-align: middle;
              color: #606266;
              font-size: 14px;
            ">显示第{{ this.params.page }}页的{{ this.params.rows }}条记录，总共{{
              this.total
            }}条记录
          </span>
        </div>
      </div>
      <div class="block" style="float: right; margin-top: 20px">
        <el-pagination :current-page.sync="params.page" :page-sizes="[10, 20, 50, 100]" :page-size="params.rows" background
          layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
          @current-change="handleCurrentChange" />
      </div> -->
  
  
  
    </div>
  </template>
  <script>
  import {
    getShopList, editShop
  } from "@/api/carSource";
  
  export default {
    data() {
      return {
        loading: false,
        currentPage4: 4,
        total: 0,
        params: {
          shopName: ''
        },
        tableData: []
  
      };
    },
  
    methods: {
     
      getData(exportExcel) {
        if (exportExcel) {
          this.params.export = true
          // parkIncomeexport(this.params, "车场收入明细")
        } else {
          this.loading = true;
          this.params.export = false
          getShopList(this.params).then((res) => {
            this.loading = false;
            this.total = res.data.total;
            this.tableData = res.data.rows;
          });
        }
      },
     
    },
    mounted() {
      this.getData();
    },
  };
  </script>
  <style scoped lang="scss">
  .my-radio {
    margin-bottom: 10px;
  }
  
  .dialog {
    width: 95%;
    height: 100%;
    padding-top: 30px;
    margin-left: 60px;
  }
  </style>
  